{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Uninstall deployment\n",
    "Use Helm to uninstall all the previous deployments"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 10,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "release \"feast-online\" uninstalled\n",
      "release \"feast-offline\" uninstalled\n",
      "release \"feast-registry\" uninstalled\n",
      "NAME\tNAMESPACE\tREVISION\tUPDATED\tSTATUS\tCHART\tAPP VERSION\n"
     ]
    }
   ],
   "source": [
    "!helm uninstall feast-online\n",
    "!helm uninstall feast-offline\n",
    "!helm uninstall feast-registry\n",
    "!helm list"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "Delete the PostgreSQL deployment."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 11,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "secret \"postgres-secret\" deleted\n",
      "persistentvolume \"postgres-volume\" deleted\n",
      "persistentvolumeclaim \"postgres-volume-claim\" deleted\n",
      "deployment.apps \"postgres\" deleted\n",
      "service \"postgres\" deleted\n"
     ]
    }
   ],
   "source": [
    "!kubectl delete -f postgres/postgres.yaml"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 12,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "No resources found in feast namespace.\n",
      "No resources found in feast namespace.\n",
      "NAME                    READY   STATUS      RESTARTS   AGE\n",
      "feast-apply-job-tzscd   0/1     Completed   0          2m40s\n"
     ]
    }
   ],
   "source": [
    "!kubectl get svc\n",
    "!kubectl get deployments\n",
    "!kubectl get pods"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "feast3.11",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.11.9"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
